package com.kantboot.business.talent.repository;

import com.kantboot.business.talent.domain.entity.BusTalentTitleLevelExperienceOfUserAccount;
import jakarta.transaction.Transactional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface BusTalentTitleLevelExperienceOfUserAccountRepository extends JpaRepository<BusTalentTitleLevelExperienceOfUserAccount, Long> {

    @Transactional
    @Modifying
    @Query("delete from BusTalentTitleLevelExperienceOfUserAccount where userAccountId = ?1")
    void deleteByUserAccountId(Long userAccountId);


    @Transactional
    @Modifying
    @Query("delete from BusTalentTitleLevelExperienceOfUserAccount where titleLevelId is null")
    void deleteByTitleLevelIdIsNull();

}
